package com.dolphin.servicedriveruser.service;

import com.dolphin.common.dto.ResponseResult;
import com.dolphin.servicedriveruser.mapper.DriverUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CityDriverUserService {
    @Autowired
    DriverUserMapper driverUserMapper;

    public ResponseResult<Boolean> isAvailableDriver(String cityCode) {
        int count = driverUserMapper.selectDriverUserCountByCityCode(cityCode);
        if (count > 0) {
            return ResponseResult.success(true);
        }
        return ResponseResult.success(false);
    }
}
